<template>
  <div class="transfer" >
    <el-card>
      <el-table :data="transferList" style="width: 100%">
        <el-table-column prop="processName" label="流程名称">
        </el-table-column>
        <el-table-column prop="lastAssigneeName" label="上一位处理人">
        </el-table-column>
        <el-table-column prop="curAssigneeName" label="当前处理人">
        </el-table-column>
        <el-table-column prop="createTime" label="时间" >
        </el-table-column>
      </el-table>
      <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="pageData.pageNum"
        :page-sizes="[5, 10, 15, 30]"
        :page-size="10"
        layout="total, sizes, prev, pager, next, jumper"
        :total="pageData.total"
        :pagerCount="5"
      >
      </el-pagination>
    </el-card>
  </div>
</template>
<script>
export default {
  data () {
    return {
      transferList: [],
      pageData: {
        total: 0,
        pageSize: 10,
        pageNum: 1,
      },
    };
  },

  methods: {
    transferFn () {
      let params = {
        page: this.pageData.pageNum,
        size: this.pageData.pageSize,
        type: 2
      };

      this.$http
        .get('/api/flow/door/rdTurnTask-select', {
          params: params
        })
        .then((res) => {
          this.transferList = res.data.result.list;
          this.pageData.total = res.data.result.total;
        })
        .catch(() => {
          this.$Message.error("列表查询失败");
        });
    },
    // 分页
    handleSizeChange (val) {
      this.pageData.pageSize = val
      this.transferFn()
    },
    handleCurrentChange (val) {

      this.pageData.pageNum = val;
      this.transferFn()
    },
  },
};
</script>
<style lang="less" scoped>
  @import "../../admin/styles/formStyle.less";
  .el-pagination {
    width: 100%;
    margin-top: 30px;
    white-space: normal !important
 }
el-card{
  margin-bottom: 100px;
}
 ::v-deep .el-pagination__total{
   margin: 0px;
 }
 ::v-deep .el-pagination__jump{
   margin: 0px;
 }
  ::v-deep .el-table__fixed-right::before{
  height: 0px;
}
</style>
